package com.example.day13;

import java.util.Calendar;
import java.util.Scanner;

/**
 * @author Lenovo
 */
public class CalendarTest {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入年份：");
        int year =sc.nextInt();
        Calendar calendar =Calendar.getInstance();
        calendar.set(year,0,1);
        Calendar.add(Calendar.DAY_OF_YEAR,-1);
        int day =calendar.get(Calendar.DAY_OF_WEEK);
        System.out.println(year + "年的1月1日是星期" + day);
    }
}
